Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split on hyphens as well as whitespace #98

Merged
merged 1 commit into from
Jul 14, 2014

Conversation

nolanlawson
Copy link
Contributor

Example:

Take the New York-San Francisco flight.

"york-san" isn't a word, so it shouldn't be output by the tokenizer.

For precedence, Lucene's standard tokenizer also splits on hyphens, although it doesn't do it for product numbers like 31-5-6, which is not implemented here due to complexity.

Prompted by pouchdb-community/pouchdb-quick-search#3.

@olivernn
Copy link
Owner

Thanks!

@nolanlawson
Copy link
Contributor Author

No prob!

@debug64
Copy link

debug64 commented Jul 25, 2014

I think the solution has a problem when indexing text like "A - B", it leads to an empty token which results in a broken (not searchable) index.

@nolanlawson
Copy link
Contributor Author

Yup, you're right, that's a bug. Will fix.

@olivernn
Copy link
Owner

version 0.5.5 includes the fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants